home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Word Perfect Main Street: Paper Planes
/
WordPerfect Main Street - Paper Planes.iso
/
mac
/
Gloss
/
00018_Script_18
< prev
next >
Wrap
Text File
|
1994-05-12
|
2KB
|
53 lines
-- this strange code is to allow the scroll bar to function normally,
-- yet do my own hilite based on screen location....Lingo's hilite only works on
-- editable text....which is not what we need
on mouseDown
global GlossHilite, GlossText, MaxScreenLines
if the mouseH < (the locH of sprite GlossText + the width of sprite GlossHilite) then
set screenLine = the mouseV - the locV of sprite GlossText
set screenLine = (screenLine / the textHeight of field "Glossary")
if screenLine >= 0 and screenLine < MaxScreenLines then
set newLineV = (the textHeight of field "Glossary") * screenLine
set newLineV = newLineV + (the locV of sprite GlossText)
set the locV of sprite GlossHilite = newLineV
else
set the locV of sprite GlossHilite = 600 -- well off the bottom of the screen
end if
else
set the locV of sprite GlossHilite = 600 -- well off the bottom of the screen
end if
updateStage
end
on mouseUp
global GlossHilite, GlossText, MaxScreenLines
global TheLine -- used later in the "play" frames
set TheLine = the mouseLine -- read as soon as we go up
if the mouseH < (the locH of sprite GlossText + the width of sprite GlossHilite) then
set screenLine = the mouseV - the locV of sprite GlossText
set screenLine = (screenLine / the textHeight of field "Glossary")
if screenLine >= 0 and screenLine < MaxScreenLines then
set newLineV = (the textHeight of field "Glossary") * screenLine
set newLineV = newLineV + (the locV of sprite GlossText)
set the locV of sprite GlossHilite = newLineV
else
set the locV of sprite GlossHilite = 600 -- well off the bottom of the screen
end if
updateStage
-- this field is the frame label for any visual
set theAudio = item 1 of line TheLine of field "GlossaryData"
set theLabel = item 2 of line TheLine of field "GlossaryData"
if theLabel <> EMPTY then
-- before visual
set the locV of sprite GlossHilite = 600 -- well off the bottom of the screen
play frame theLabel
else
if theAudio <> EMPTY then
play frame "AudioOnly"
end if
-- after audio
set the locV of sprite GlossHilite = 600 -- well off the bottom of the screen
updateStage
end if
end if
end